package com.woniuxy.threeproject.end_water_project_user.controller;


import com.woniuxy.threeproject.end_water_project_user.commons.Result;
import com.woniuxy.threeproject.end_water_project_user.service.IDetailsClassifyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 文章分类表 前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2021-08-25
 */
@RestController
@RequestMapping("/detailsClassify")
@CrossOrigin("*")
@Slf4j
public class DetailsClassifyController {

    @Resource
    private IDetailsClassifyService detailsClassifyService;

    @GetMapping("classify")
    public Result findClassify(Integer classifyId){
        log.info("获取文章分类，接收用户请求 {}",classifyId);
        return detailsClassifyService.findClassifyById(classifyId);
    }

}

